﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Crimson;
using Crimson.Module;
using Ornament.Util;
public partial class History_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var now = DateTime.Now;
            IList<Info> List = InfoManager.DaoFactory.InfoDao.Find("大事记", now.FirstDayOfMonth(), now.LastDayOfMonth(), InfoState.Published, true);
            Repeater1.DataSource = List;
            Repeater1.DataBind();
        }
    }

    protected void OnVisibleMonthChanged(object sender, MonthChangedEventArgs e)
    {

        IList<Info> List = InfoManager.DaoFactory.InfoDao.Find("大事记", e.NewDate.FirstDayOfMonth(), e.NewDate.LastDayOfMonth(), InfoState.Published, true);
        Repeater1.DataSource = List;
        Repeater1.DataBind();
    }
}
